<html>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<body>
<h2><?=$this->table->comment?></h2>

<form action="<?=$this->base_url.'save?name='.$this->table->name?>" method="post">
<input type="hidden" name="f_id" value="<?=(int)$this->data['id']?>">

<table width="" border="1">
<? foreach($this->table->fields as $field)
{
	if ($field['comment'])
	{
		echo '<tr>';
		echo '	<td>'.$field['comment'].':'.$field['type'].'</td>';
		echo '	<td><input type="text" name="f_'.$field['name'].'" value="'.$this->data[$field['name']].'"/></td>';
		//echo '	<td><a href="">E</a> <a href="">X</a></td>';
		echo '</tr>';
	}
}
?>
</table>
<input type="submit" value="Сохранить" >
<input type="button" value="Назад" onClick="document.location='<?=$this->base_url.'view?name='.$this->table->name?>'">
</form>

</body>
</html>